package com.menghao.sso.server.registry;

import com.menghao.sso.server.model.ticket.Ticket;

import java.util.Collection;

/**
 * 票据注册器接口
 */
public interface TicketRegistry {

    /**
     * 添加一个Ticket
     */
    void addTicket(Ticket ticket);

    /**
     * 根据Id获取Ticket
     */
    Ticket getTicket(String ticketId);

    /**
     * 根据Id移除Ticket
     */
    boolean deleteTicket(String ticketId);

    /**
     * 获取所有Ticket
     */
    Collection getTickets();
}
